<?php
namespace app\common\model;

class FilmHotModel extends \think\Model
{
    protected $table = 'db_film_hot';

    protected $autoWriteTimestamp = 'datetime';

    // 定义时间戳字段名
    protected $createTime = 'c_time';
    protected $updateTime = 'u_time';

    public function getSeasonsAttr($val) {
        $res = json_decode($val, true);
        return is_array($res) ? $res : [];
    }


    public function getRatingAttr($val) {
        $res = json_decode($val, true);
        return is_array($res) ? $res : [];
    }


    public function getVideosAttr($val) {
        $res = json_decode($val, true);
        return is_array($res) ? $res : [];
    }


    public function getPhotosAttr($val) {
        $res = json_decode($val, true);
        return is_array($res) ? $res : [];
    }

    public function getPubdatesAttr($val) {
        $res = json_decode($val, true);
        return is_array($res) ? $res : [];
    }

    public function getAkaAttr($val) {
        $res = json_decode($val, true);
        return is_array($res) ? $res : [];
    }


    public function getDurationsAttr($val) {
        $res = json_decode($val, true);
        return is_array($res) ? $res : [];
    }


    public function getLanguagesAttr($val) {
        $res = json_decode($val, true);
        return is_array($res) ? $res : [];
    }


    public function getGenresAttr($val) {
        $res = json_decode($val, true);
        return is_array($res) ? $res : [];
    }


    public function getDirectorsAttr($val) {
        $res = json_decode($val, true);
        return is_array($res) ? $res : [];
    }

    public function getCastsAttr($val) {
        $res = json_decode($val, true);
        return is_array($res) ? $res : [];
    }

    public function getWritersAttr($val) {
        $res = json_decode($val, true);
        return is_array($res) ? $res : [];
    }

}
